package cn.edu.hyit.hjq.volunteems.backend.utils;

import io.jsonwebtoken.SignatureAlgorithm;
import io.jsonwebtoken.io.Encoders;
import io.jsonwebtoken.security.Keys;

import javax.crypto.SecretKey;

public class JwtSecretGenerator {
    public static String generateSecureSecret() {
        SecretKey secretKey = Keys.secretKeyFor(SignatureAlgorithm.HS512);
        return Encoders.BASE64.encode(secretKey.getEncoded());
    }

    public static void main(String[] args) {
        System.out.println("Generated JJWT Secret: " + generateSecureSecret());
    }
}
